Generators allow pausing and resuming execution, making them ideal for managing complex asynchronous flows (side effects) in a synchronous-looking manner.
Redux-Saga uses generators to handle side effects because they can yield effects (e.g., API calls) and wait for them to resolve without blocking the main thread, enabling testability and declarative control flow. The generator pauses at each yield, the saga middleware executes the effect and resumes the generator with the result.